no need to malloc if initialising anyway
small cleanup of typos and extra test not needed