slight interface change
fixed 2 bugs