modified code for adnet