proper trimming
fix for pass-by-refs
arg
add price calc function