0.0.8
extract common out functionality