migrated functions to euler.py library