Tried to re-implement jsuereth's github example