frontend to mega.py