refactor the util directory a bit