Add some new functions in payload.py