just write it in a real programming language