revise implementation