TODO: debug, Main, implement measurements