completed base functionality for requirement #1