debug code will be removed later