added missing elements, fixed code style