initial code... hope it didnt get f****d.