use global state to manage memory
add .idea to gitignore