Pocket API and some magic