almost done need to debug