finish the implementation