improvements according to comments by a friend :) hb