add checks for static vars