Added sketchy implementation of helper functions and  unit tests for problem4