moved code to modifier