error fix.
moved things to classes