Adding all the functionality