working, with exception of return value saving