added documentation, one more function to write