Updated code. Removed text output.