streamlined, removed code