remove unnecessary functions, and fix ,as maps