code refactor and added jquery turbolinks