less redundant code