first draft of finished positions.cpp