cleaned up code
cleaned up code
refined and simplified source code