changed int to val