resolving js issue