updated to new style, organized things better