cleaned up wrapper