optimise
added promotion detection