added palette loading