changed the initalization of elements so hopefully later I can build uis with json