removed some function wrapping