Added in core logic, next some tests