major refactoring
major refactoring on the way
update API