write tests first
finished basic functions