Added new feature for tasks #119 and #120.