refactored create gist conditional to one line