Updated code blocks
Fixed syntax on first use case