validate inputs and/or set defaults