add testcode for testing the function 'open ahead'