fixed errors in operator, now works