Added working loading functionality