added controller thing
added a little json stuff