workaround for "taking address of temporary"
updated for unix