[/] refactoring + bug fixing