sample receiver code as starting point