finish the port to polymer.dart