Final Version

Added unit tests