add new logic

Signed-off-by: Andrea Corna <andrea.corna.ac.91@gmail.com>
add documentation

Signed-off-by: Andrea Corna <andrea.corna.ac.91@gmail.com>