less classy, more free functions