added self replicating class