update

almost changed all the code. Sorry for the inconvenience