attempting to optimize program: a start