Moved old code and added in new code