updated argument passint to use a hash