rewrite of minekeepr