added test and funtions to resolve it