Now using sort function to order main methods.