adding basic logic to test function code