fixed almost everything