first real functioning version - preparing tests and doc