All done. Might do a refactoring later