added devorator function