variables should be within handler