added docs, removed unused parameters