made action logic a bit more clear