Changed function argument names to provide better API