code clean up and hook up to modal screen