Sample hydrator code