if data is available, then continues reading from the buffer
used combined defines to improve readability of calls