extract to util class?