initial solutions with comments -- works in modern browsers