Updated Code

Updated Code from Imran