first version of general controller