functioning screen initialization code with infinite loop