parse and prepare