simplified redundant code