attempting to simplify input code