Applying Dilini's changes