cleanup of 004 js solution
go solution for 004