surprisingly,I found the answer myself...
I am using the same function as I used for next/previous post
(get_adjacent_post() )
but sending the the next/previous post which I already found as a parameter
$in_same_cat = true;
$excluded_categories = '';
$previous = true;
$previous_post = get_adjacent_post($in_same_cat,$excluded_categories,$previous);
$previous_previous_post =
get_adjacent_post($in_same_cat,$excluded_categories,$previous,$previous_post);
$previous = false;
$next_post = get_adjacent_post($in_same_cat,$excluded_categories,$previous);
$next_next_post = get_adjacent_post($in_same_cat,$excluded_categories,$previous,$next_post);
but...we haven't finished yet..
we need to add this code to the function declaration in wp-includes/link-template.php
function get_adjacent_post($in_same_cat = false, $excluded_categories = '', $previous = true,$mypost = null) {
global $wpdb;
//if specific post wasnt sent to function it takes the global one and checks if its empty before using it.
if ( empty( $mypost ) )
{
global $post;
if(empty( $post ))
return null;
$mypost=$post;
}
//...