added code for pascals triangle