code that might even do the whole the am