* code for task #505.