put it in a funcation