changes to accept arguments as hashes and to have defaults in case nothing passed