working with puts as error