logic js added