cleaned up, commented