removed portion of code that involves background modelling (ignore this for now, do DSS first), tested to work on SDSS bulk run