finished math, removed asm b/c time constraints