some magic just to make it work