Implementation of few algorithms