First attempt
Added fix for constructor bug