added a test, changed a param list for readability