reformat code
Implements interface, counting results, order and limit them