Rewrote to use kue