moved py name getter to function