stack:to_array() function added