refactored the controls so that they can be used by the client