first version with limited functionalities (and still kinda messy)