fix functions to work without require
fix