make instances generic, fix its tests, add required params to instance attributes