adding testcases and moving function from utils to helpers