adding algorithim analysis