moved to local variables