need to fix the constructor type problem