basic implementation for follow - fixed empty list issue from lab1