add validation to snippets
validate snippet url
fixed db connection