Some more changes made. This also works