bug fix..changed else if to elif