added & updated code