almost done with implementation