Some basic algorithim planning