added positive integer check