removed extra curly brace causing an empty loop