added priority option to init