changes for limit validation , and removed commented code