add a check if solid is successfully defined
use  instead of p and puts