added realization of buffer and runnable