moved action-func into general