inbox script - needs writing