Added ifdef functions