change methods and add tests/core.py