Added first part of code, still unfinished though