modal widow creation moved to factory