added draw solid boundary and optimization