simple optimize round function