using python instead of cpp