re-wrote and reorganized existing features