replaced separate getters and setters for attributes with one method that takes as input the name of the attribute