changing the all method to the top method