Added selection, compiles, who knows if it functions properly