added logging of assigning
- minor bug fixing