cleaned up code, removedecho statements