Filled out code to make functional