adding helper-functions

Signed-off-by: Daniel Dahlkvist <messer_@hotmail.com>