some magic here and there