perfect operate function