organize megaup.py