Adding Selection algorithm