fixed a bug, build up for scaling