added peek, might have problems with freeing