tidy signatures, added documentation