Main logic method defined.