Added checking, and conditionals.