Added logic and changed title