UPDATE: code clean up