generified class
moved some stuff