some apsm.cpp progress