Changed to seperate member methods and added tests