moved stuff into abstract class