commented, fixed formatting, changed API