this is the most up to date code, any work done should start from here