Use val function in level creator logic