adjust dir and rebuild