added code to allow operators to work on different types