Signed-off-by: rich5851 <rich5851@yahoo.co.uk>
added test function