Partial implementation of sequential solution