cleaned up implementation of instantiation