span function moved to div