working for multiple operations and operands