finalized generic interface and fixed a couple bugs