simple utility for parsing input parameters