improve gatefunction input in frontend
fix gatefunctions