found someone else had implemented and shared