working code...still working on modals