make the operation function less dumb