I think that this is a much better solution. Needs docs