replaced new statement button block with protocol which greatly simplifies code