added tscalr and main