implemented jasdeep's changes