moved elm code to the end