added hasKey method
added documentation to methods