initial commit javascript logic file