moved utilities to a seperate file