working on empcreatefunc