updated for testing purposes
refractory
spelling error
penalty function and prettyPrint