a couple of changes according to the comments, not finished now