fixed deprecated warning by using new syntax