Implement initial version of solution