solved a couple of problems