add POS form and fixed some bugs