removing copied code, replacing with psuedo code for now