working tested version

Version after testing successfully and including comments