reduce code duplication
update dependencies