Added some attempts at handeling sliding window protocol