my acm implementation