Temporary diagnostic code for bug fixing - need to fix act function