add checks for js