Fixed #14 refactor with adapter

Fixed #14 refactor with adapter