use a macro to simplify input