lots of cleanup, added very loose selection