THIS CODE WORKS - Tested in lab