repo and formtype. trying to clean the code...