implementing operations with constraints