revise a helper method for rdominoj