organized some more code