added test and code for task due