validating endpoint
bug fix js