some improvments and debugging :bug: