update dist version
make resolve and reject DRY
cleanup code