why is 1 and 0 hardcoded ? needs a comment.