revise rest of implementation