fully implemented all functionality