start implementation of direct solver