make the code more python-like and easy to use