cleaned up code/working