edit helper method and change level to integer