updated (some with comments)
updated more correct solutions