change version, refactor names and dup code