re-created factory interface to make shadow sample work