This madness actually works, but needs form cleanup