better implementation of ops