Both Functions Implemented. Working on tests