Fixed #10 refactor with adapter

#10