Changing Class inheritence