added nates code