finishing code and testing.