add functions for knowing if goal buffer is full or empty
correct some small mistakes