fixed errors that came with implementing using