changed the access specifier for methods, created a constant for error messages