improved the code

Signed-off-by: David Arendsen <david@1001ict.nl>