Added import statements and receive method