fixed issues with order of arguments