Corrected code for adam
Adding Profiled and tested vode