clean up old code a bit