renamed some method params to make it clearer what is happening