[FEATURE] use promises, write tests