making it python2/3 compatible