#158 implement test sequence 4
#158 implement test sequence 4 and improve indentation