added warning
changed scope to prototype