improved some solutions