Added the rest of the functionality sort of