Made insert more pythonic