working with scaml and jade...could probably use a bit more optimization