refactored

Signed-off-by: Raphaël Audet <raphael.audet@gmail.com>