tasks #41, #31, #505