using a promises abstraction layer for less code per module