Added rest of functionality.