Added logic to functions