added forward declaration
improved tests