Basics done, still need to do the sorting bit