renamed and finished writing, now debugging