separated functionality in two objects, updated example and readme