abstract out utils