Changed from procedure to function, returns array u