Added the rest of the required functionality