refactoring

Signed-off-by: David Guillemin <david.guillemin@gmail.com>