#74 replaced hard coded conditional by corresponding method