dict and input-check as own function