add checks, fix static