moved an if check out in its own method for better design, removed unneeded comment