+ Added testing and refactored