Finished adding logic