first draft block functions finished, need testing