passing return value of method as an argument to another method