Some utils to get rid of boilerplate code